<%--
 * edit.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags"%>


<form:form action="${requestURI}" modelAttribute="assess">
	<jstl:choose>
		<jstl:when test="${!routes.isEmpty}">

			<form:hidden path="participant" />
			<acme:textbox code="assess.rate" path="assessment.rate" />
			<acme:textbox code="assess.comment" path="assessment.comment" />
			<h1>
				<spring:message code="assess.routes" />
			</h1>

			<jstl:forEach var="route" items="${routes}">
				<form:radiobutton path="route" value="${route}" />${route}
		<br />
			</jstl:forEach>
			<br />
			<input type="submit" name="save"
				value="<spring:message code="assess.save" />" />
			<acme:cancel code="assess.cancel" url="../" />
		</jstl:when>
		<jstl:otherwise>
			<h1>
				<spring:message code="assess.routesEmpty" />
			</h1>
		</jstl:otherwise>
	</jstl:choose>

</form:form>